(define (domain pick-and-place)
  (:requirements :strips :equality)
  (:predicates
    (Move ?s1 ?r ?q1 ?t ?q2 ?s2)
    (Pick ?s1 ?r ?b ?q ?p ?g ?s2)
    (Place ?s1 ?r ?b ?q ?p ?g ?s2)

    (AtState ?s)
    (AtGoal)
    (SatisfiesGoal ?s)
  )
  (:action move
    :parameters (?s1 ?r ?q1 ?t ?q2 ?s2)
    :precondition (and (Move ?s1 ?r ?q1 ?t ?q2 ?s2)
                       (AtState ?s1))
    :effect (and (AtState ?s2)
                 (not (AtState ?s1)))
  )
  (:action pick
    :parameters (?s1 ?r ?b ?q ?p ?g ?s2)
    :precondition (and (Pick ?s1 ?r ?b ?q ?p ?g ?s2)
                       (AtState ?s1))
    :effect (and (AtState ?s2)
                 (not (AtState ?s1)))
  )
  (:action place
    :parameters (?s1 ?r ?b ?q ?p ?g ?s2)
    :precondition (and (Place ?s1 ?r ?b ?q ?p ?g ?s2)
                       (AtState ?s1))
    :effect (and (AtState ?s2)
                 (not (AtState ?s1)))
  )
  (:derived (AtGoal)
    (exists (?s) (and (SatisfiesGoal ?s)
                      (AtState ?s)))
  )
)